home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / unix / ch17 / 17fig14b.wrl < prev    next >
Text File  |  1996-09-22  |  2KB  |  82 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright [1997] By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Group {
  6.     children [
  7.     # Ground
  8.         Shape {
  9.             appearance Appearance {
  10.                 material Material {
  11.                     diffuseColor 0.0 0.7 0.0
  12.                 }
  13.             }
  14.             geometry Box { size 10.0 0.01 10.0 }
  15.         },
  16.     # Well wall
  17.         Shape {
  18.             appearance Appearance {
  19.                 material Material { }
  20.                 texture ImageTexture {
  21.                     url "wellwall.jpg"
  22.                 }
  23.             }
  24.             geometry Extrusion {
  25.                 creaseAngle 1.57
  26.                 beginCap FALSE
  27.                 endCap   FALSE
  28.                 crossSection [
  29.                 # upside-down U-shape
  30.                      0.4  0.0,
  31.                      0.4 -0.7,
  32.                     -0.4 -0.7,
  33.                     -0.4  0.0,
  34.                 ]
  35.                 spine [
  36.                 # Circle
  37.                      2.00 0.0  0.00,   1.85 0.0 0.77,
  38.                      1.41 0.0  1.41,   0.77 0.0 1.85,
  39.                      0.00 0.0  2.00,  -0.77 0.0 1.85,
  40.                     -1.41 0.0  1.41,  -1.85 0.0 0.77,
  41.                     -2.00 0.0  0.00,  -1.85 0.0 -0.77,
  42.                     -1.41 0.0 -1.41,  -0.77 0.0 -1.85,
  43.                      0.00 0.0 -2.00,   0.77 0.0 -1.85,
  44.                      1.41 0.0 -1.41,   1.85 0.0 -0.77,
  45.                      2.00 0.0  0.00,
  46.                 ]
  47.             }
  48.         },
  49.     # Well water
  50.         Shape {
  51.             appearance Appearance {
  52.                 # No material, use emissive texturing
  53.                 texture MovieTexture {
  54.                     url "wrlpool.mpg"
  55.                     loop TRUE
  56.                 }
  57.             }
  58.             geometry IndexedFaceSet {
  59.                 solid FALSE
  60.                 coord Coordinate {
  61.                     point [
  62.                     # Circle
  63.                          2.00 0.6  0.00,   1.85 0.6 0.67,
  64.                          1.41 0.6  1.41,   0.67 0.6 1.85,
  65.                          0.00 0.6  2.00,  -0.67 0.6 1.85,
  66.                         -1.41 0.6  1.41,  -1.85 0.6 0.67,
  67.                         -2.00 0.6  0.00,  -1.85 0.6 -0.67,
  68.                         -1.41 0.6 -1.41,  -0.67 0.6 -1.85,
  69.                          0.00 0.6 -2.00,   0.67 0.6 -1.85,
  70.                          1.41 0.6 -1.41,   1.85 0.6 -0.67,
  71.                          2.00 0.6  0.00,
  72.                     ]
  73.                 }
  74.                 coordIndex [
  75.                     0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
  76.                     11, 12, 13, 14, 15, 16
  77.                 ]
  78.             }
  79.         }
  80.     ]
  81. }
  82.